@@ -122,7 +122,15 @@ def tj_consumer(request):  | 
            ||
| 122 | 122 | 
                @transaction.atomic  | 
            
| 123 | 123 | 
                def tj_generate(request):  | 
            
| 124 | 124 | 
                # 1 0 * * * curl http://kodo.xfoto.com.cn/api/tj/generate  | 
            
| 125 | 
                - ymd = int(tc.local_string(format='%Y%m%d'))  | 
            |
| 125 | 
                +  | 
            |
| 126 | 
                + __tj_generate(ymd=None)  | 
            |
| 127 | 
                +  | 
            |
| 128 | 
                + return response()  | 
            |
| 129 | 
                +  | 
            |
| 130 | 
                +  | 
            |
| 131 | 
                +@transaction.atomic  | 
            |
| 132 | 
                +def __tj_generate(ymd=None):  | 
            |
| 133 | 
                + ymd = ymd or int(tc.local_string(format='%Y%m%d'))  | 
            |
| 126 | 134 | 
                 | 
            
| 127 | 135 | 
                brands = BrandInfo.objects.filter(status=True)  | 
            
| 128 | 136 | 
                 | 
            
                @@ -194,5 +202,3 @@ def tj_generate(request):  | 
            ||
| 194 | 202 | 
                brand_id=brand.brand_id,  | 
            
| 195 | 203 | 
                ymd=ymd,  | 
            
| 196 | 204 | 
                )  | 
            
| 197 | 
                -  | 
            |
| 198 | 
                - return response()  |